<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cppMISC: tcpConnect类 参考</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript" src="../../darkmode_toggle.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">cppMISC<span id="projectnumber">&#160;v1.1</span>
   </div>
   <div id="projectbrief">cppMisc 文档系统</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">类</a> &#124;
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="../../df/d0f/classtcp_connect-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">tcpConnect类 参考</div></div>
</div><!--header-->
<div class="contents">

<p>使用libuv实现的 TCP 客户链接管理模块  
 <a href="#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="../../dd/d42/connection_8hpp_source.html">connection.hpp</a>&gt;</code></p>
<div class="dynheader">
tcpConnect 的协作图:</div>
<div class="dyncontent">
<div class="center"><img src="../../df/d10/classtcp_connect__coll__graph.png" border="0" usemap="#atcp_connect_coll__map" alt="Collaboration graph"/></div>
<map name="atcp_connect_coll__map" id="atcp_connect_coll__map">
<area shape="rect" title="使用libuv实现的 TCP 客户链接管理模块" alt="" coords="5,5,172,405"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
类</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d3a/structtcp_connect_1_1st_send_req.html">stSendReq</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:a4d03abd4b5fcdddd1824fa62d7e1d76a" id="r_a4d03abd4b5fcdddd1824fa62d7e1d76a"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a4d03abd4b5fcdddd1824fa62d7e1d76a">emErrCode</a> { <br />
&#160;&#160;<a class="el" href="#a4d03abd4b5fcdddd1824fa62d7e1d76aa3a3d8ecfabf8e65f67095fe518e3907d">ERR_ALLOC_MEM</a> = -1000
, <a class="el" href="#a4d03abd4b5fcdddd1824fa62d7e1d76aaa986cb21c90c7464a5bd3a609cff4339">ERR_INIT_SOCKET</a>
, <a class="el" href="#a4d03abd4b5fcdddd1824fa62d7e1d76aa7f9390b5aca539bce9e01c38fa8a8c58">ERR_SOCKET</a>
, <a class="el" href="#a4d03abd4b5fcdddd1824fa62d7e1d76aa21d5ae99cd043725442707213189005d">ERR_SEND_DATA</a>
, <br />
&#160;&#160;<a class="el" href="#a4d03abd4b5fcdddd1824fa62d7e1d76aae5994f3020584a57e2a639e634c1dcbd">ERR_TCP_NULL</a>
, <a class="el" href="#a4d03abd4b5fcdddd1824fa62d7e1d76aa2a24542e567f8fe800702fe981a1daf6">OK</a> = 0
<br />
 }</td></tr>
<tr class="separator:a4d03abd4b5fcdddd1824fa62d7e1d76a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a1c6a3ae19041221780401c703827d794" id="r_a1c6a3ae19041221780401c703827d794"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1c6a3ae19041221780401c703827d794">tcpConnect</a> (uv_tcp_t *tcp=nullptr)</td></tr>
<tr class="memdesc:a1c6a3ae19041221780401c703827d794"><td class="mdescLeft">&#160;</td><td class="mdescRight">以上是C语言的回调函数，用于和libuv对接  <br /></td></tr>
<tr class="separator:a1c6a3ae19041221780401c703827d794"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe3affb5242552ca4a4f18a9d8d93853" id="r_abe3affb5242552ca4a4f18a9d8d93853"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#abe3affb5242552ca4a4f18a9d8d93853">~tcpConnect</a> ()</td></tr>
<tr class="separator:abe3affb5242552ca4a4f18a9d8d93853"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62b839c5c632070457c11141ec17b940" id="r_a62b839c5c632070457c11141ec17b940"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a62b839c5c632070457c11141ec17b940">onAllocMem</a> (uv_buf_t *buf)</td></tr>
<tr class="memdesc:a62b839c5c632070457c11141ec17b940"><td class="mdescLeft">&#160;</td><td class="mdescRight">响应内存分配请求  <br /></td></tr>
<tr class="separator:a62b839c5c632070457c11141ec17b940"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a44f7ed0e8e6c5026f69eb93b9484db" id="r_a6a44f7ed0e8e6c5026f69eb93b9484db"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a6a44f7ed0e8e6c5026f69eb93b9484db">start</a> ()</td></tr>
<tr class="memdesc:a6a44f7ed0e8e6c5026f69eb93b9484db"><td class="mdescLeft">&#160;</td><td class="mdescRight">启动执行  <br /></td></tr>
<tr class="separator:a6a44f7ed0e8e6c5026f69eb93b9484db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc6cec650922874b8ca82221fe8e987b" id="r_abc6cec650922874b8ca82221fe8e987b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#abc6cec650922874b8ca82221fe8e987b">name</a> (const std::string &amp;n)</td></tr>
<tr class="memdesc:abc6cec650922874b8ca82221fe8e987b"><td class="mdescLeft">&#160;</td><td class="mdescRight">指定连接名称或者读取连接名称  <br /></td></tr>
<tr class="separator:abc6cec650922874b8ca82221fe8e987b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3db9cc5be0a25212c5cf1f7d3c0a229f" id="r_a3db9cc5be0a25212c5cf1f7d3c0a229f"><td class="memItemLeft" align="right" valign="top">const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3db9cc5be0a25212c5cf1f7d3c0a229f">name</a> () const</td></tr>
<tr class="separator:a3db9cc5be0a25212c5cf1f7d3c0a229f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e573d0bbcfd9a2c0e7f10f37d84fa46" id="r_a3e573d0bbcfd9a2c0e7f10f37d84fa46"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3e573d0bbcfd9a2c0e7f10f37d84fa46">send</a> (const char *data, size_t len)</td></tr>
<tr class="memdesc:a3e573d0bbcfd9a2c0e7f10f37d84fa46"><td class="mdescLeft">&#160;</td><td class="mdescRight">发送数据  <br /></td></tr>
<tr class="separator:a3e573d0bbcfd9a2c0e7f10f37d84fa46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e47a364f3a6980332e35589eb4b8690" id="r_a0e47a364f3a6980332e35589eb4b8690"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0e47a364f3a6980332e35589eb4b8690">peerAddress</a> ()</td></tr>
<tr class="memdesc:a0e47a364f3a6980332e35589eb4b8690"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取对端对峙  <br /></td></tr>
<tr class="separator:a0e47a364f3a6980332e35589eb4b8690"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ad930fd567805e8bdb83b2189ff5c48" id="r_a1ad930fd567805e8bdb83b2189ff5c48"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1ad930fd567805e8bdb83b2189ff5c48">peerPort</a> ()</td></tr>
<tr class="memdesc:a1ad930fd567805e8bdb83b2189ff5c48"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取对端端口  <br /></td></tr>
<tr class="separator:a1ad930fd567805e8bdb83b2189ff5c48"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace0b548a07940bc95005fd84d1d4917f" id="r_ace0b548a07940bc95005fd84d1d4917f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ace0b548a07940bc95005fd84d1d4917f">close</a> ()</td></tr>
<tr class="memdesc:ace0b548a07940bc95005fd84d1d4917f"><td class="mdescLeft">&#160;</td><td class="mdescRight">关闭连接  <br /></td></tr>
<tr class="separator:ace0b548a07940bc95005fd84d1d4917f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a773c8544725f30fdc63afaf934f6aefd" id="r_a773c8544725f30fdc63afaf934f6aefd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a773c8544725f30fdc63afaf934f6aefd">onRecv</a> (std::function&lt; void(const std::string &amp;, const char *, size_t len)&gt; fun)</td></tr>
<tr class="memdesc:a773c8544725f30fdc63afaf934f6aefd"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置事件回调函数  <br /></td></tr>
<tr class="separator:a773c8544725f30fdc63afaf934f6aefd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac906dea41da72e91452818a0bd8383aa" id="r_ac906dea41da72e91452818a0bd8383aa"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac906dea41da72e91452818a0bd8383aa">onDisconnected</a> (std::function&lt; void(const std::string &amp;) &gt; fun)</td></tr>
<tr class="separator:ac906dea41da72e91452818a0bd8383aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07bd0d4dc7717401320314fa817996c2" id="r_a07bd0d4dc7717401320314fa817996c2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a07bd0d4dc7717401320314fa817996c2">onError</a> (std::function&lt; void(const std::string &amp;, <a class="el" href="#a4d03abd4b5fcdddd1824fa62d7e1d76a">emErrCode</a>) &gt; fun)</td></tr>
<tr class="separator:a07bd0d4dc7717401320314fa817996c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14f3ada6e1c24b0a973696f586badb63" id="r_a14f3ada6e1c24b0a973696f586badb63"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a14f3ada6e1c24b0a973696f586badb63">onData</a> (const char *data, ssize_t len)</td></tr>
<tr class="memdesc:a14f3ada6e1c24b0a973696f586badb63"><td class="mdescLeft">&#160;</td><td class="mdescRight">处理接受数据  <br /></td></tr>
<tr class="separator:a14f3ada6e1c24b0a973696f586badb63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39a9e6922fd51d19c7d422e1f41d86bb" id="r_a39a9e6922fd51d19c7d422e1f41d86bb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a39a9e6922fd51d19c7d422e1f41d86bb">onClosed</a> ()</td></tr>
<tr class="memdesc:a39a9e6922fd51d19c7d422e1f41d86bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">关闭  <br /></td></tr>
<tr class="separator:a39a9e6922fd51d19c7d422e1f41d86bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22c40023d8cbc2258ae0003f2a1de7f3" id="r_a22c40023d8cbc2258ae0003f2a1de7f3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a22c40023d8cbc2258ae0003f2a1de7f3">onSendFail</a> ()</td></tr>
<tr class="memdesc:a22c40023d8cbc2258ae0003f2a1de7f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">发送失败的回调函数  <br /></td></tr>
<tr class="separator:a22c40023d8cbc2258ae0003f2a1de7f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:aacaae6d523ad0440eb5d30c8ff07b3e8" id="r_aacaae6d523ad0440eb5d30c8ff07b3e8"><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aacaae6d523ad0440eb5d30c8ff07b3e8">errMsg</a> (<a class="el" href="#a4d03abd4b5fcdddd1824fa62d7e1d76a">emErrCode</a>)</td></tr>
<tr class="memdesc:aacaae6d523ad0440eb5d30c8ff07b3e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">读取错误消息  <br /></td></tr>
<tr class="separator:aacaae6d523ad0440eb5d30c8ff07b3e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>使用libuv实现的 TCP 客户链接管理模块 </p>
<dl class="section version"><dt>版本</dt><dd>1.0 </dd></dl>
<dl class="section date"><dt>日期</dt><dd>2021-2-20 </dd></dl>
<dl class="section author"><dt>作者</dt><dd>宋炜 </dd></dl>

<p class="definition">在文件 <a class="el" href="../../dd/d42/connection_8hpp_source.html">connection.hpp</a> 第 <a class="el" href="../../dd/d42/connection_8hpp_source.html#l00016">16</a> 行定义.</p>
</div><h2 class="groupheader">成员枚举类型说明</h2>
<a id="a4d03abd4b5fcdddd1824fa62d7e1d76a" name="a4d03abd4b5fcdddd1824fa62d7e1d76a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d03abd4b5fcdddd1824fa62d7e1d76a">&#9670;&#160;</a></span>emErrCode</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="#a4d03abd4b5fcdddd1824fa62d7e1d76a">tcpConnect::emErrCode</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a id="a4d03abd4b5fcdddd1824fa62d7e1d76aa3a3d8ecfabf8e65f67095fe518e3907d" name="a4d03abd4b5fcdddd1824fa62d7e1d76aa3a3d8ecfabf8e65f67095fe518e3907d"></a>ERR_ALLOC_MEM&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a4d03abd4b5fcdddd1824fa62d7e1d76aaa986cb21c90c7464a5bd3a609cff4339" name="a4d03abd4b5fcdddd1824fa62d7e1d76aaa986cb21c90c7464a5bd3a609cff4339"></a>ERR_INIT_SOCKET&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a4d03abd4b5fcdddd1824fa62d7e1d76aa7f9390b5aca539bce9e01c38fa8a8c58" name="a4d03abd4b5fcdddd1824fa62d7e1d76aa7f9390b5aca539bce9e01c38fa8a8c58"></a>ERR_SOCKET&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a4d03abd4b5fcdddd1824fa62d7e1d76aa21d5ae99cd043725442707213189005d" name="a4d03abd4b5fcdddd1824fa62d7e1d76aa21d5ae99cd043725442707213189005d"></a>ERR_SEND_DATA&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a4d03abd4b5fcdddd1824fa62d7e1d76aae5994f3020584a57e2a639e634c1dcbd" name="a4d03abd4b5fcdddd1824fa62d7e1d76aae5994f3020584a57e2a639e634c1dcbd"></a>ERR_TCP_NULL&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a4d03abd4b5fcdddd1824fa62d7e1d76aa2a24542e567f8fe800702fe981a1daf6" name="a4d03abd4b5fcdddd1824fa62d7e1d76aa2a24542e567f8fe800702fe981a1daf6"></a>OK&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">在文件 <a class="el" href="../../dd/d42/connection_8hpp_source.html">connection.hpp</a> 第 <a class="el" href="../../dd/d42/connection_8hpp_source.html#l00019">19</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">构造及析构函数说明</h2>
<a id="a1c6a3ae19041221780401c703827d794" name="a1c6a3ae19041221780401c703827d794"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1c6a3ae19041221780401c703827d794">&#9670;&#160;</a></span>tcpConnect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">tcpConnect::tcpConnect </td>
          <td>(</td>
          <td class="paramtype">uv_tcp_t *</td>          <td class="paramname"><span class="paramname"><em>tcp</em></span><span class="paramdefsep"> = </span><span class="paramdefval">nullptr</span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>以上是C语言的回调函数，用于和libuv对接 </p>

<p class="definition">在文件 <a class="el" href="../../df/db6/connection_8cpp_source.html">connection.cpp</a> 第 <a class="el" href="../../df/db6/connection_8cpp_source.html#l00057">57</a> 行定义.</p>

</div>
</div>
<a id="abe3affb5242552ca4a4f18a9d8d93853" name="abe3affb5242552ca4a4f18a9d8d93853"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abe3affb5242552ca4a4f18a9d8d93853">&#9670;&#160;</a></span>~tcpConnect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">tcpConnect::~tcpConnect </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../df/db6/connection_8cpp_source.html">connection.cpp</a> 第 <a class="el" href="../../df/db6/connection_8cpp_source.html#l00071">71</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="ace0b548a07940bc95005fd84d1d4917f" name="ace0b548a07940bc95005fd84d1d4917f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ace0b548a07940bc95005fd84d1d4917f">&#9670;&#160;</a></span>close()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tcpConnect::close </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>关闭连接 </p>

<p class="definition">在文件 <a class="el" href="../../df/db6/connection_8cpp_source.html">connection.cpp</a> 第 <a class="el" href="../../df/db6/connection_8cpp_source.html#l00159">159</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d5/dca/classtcp_connect_ace0b548a07940bc95005fd84d1d4917f_cgraph.png" border="0" usemap="#ad5/dca/classtcp_connect_ace0b548a07940bc95005fd84d1d4917f_cgraph" alt=""/></div>
<map name="ad5/dca/classtcp_connect_ace0b548a07940bc95005fd84d1d4917f_cgraph" id="ad5/dca/classtcp_connect_ace0b548a07940bc95005fd84d1d4917f_cgraph">
<area shape="rect" title="关闭连接" alt="" coords="5,5,133,32"/>
<area shape="rect" href="../../df/db6/connection_8cpp.html#ad6d775ae6fc3120f2fcf56f9f9bdb0c1" title=" " alt="" coords="181,5,275,32"/>
<area shape="poly" title=" " alt="" coords="133,16,165,16,165,21,133,21"/>
<area shape="rect" href="../../d5/dca/classtcp_connect.html#a39a9e6922fd51d19c7d422e1f41d86bb" title="关闭" alt="" coords="323,5,474,32"/>
<area shape="poly" title=" " alt="" coords="276,16,308,16,308,21,276,21"/>
</map>
</div>

</div>
</div>
<a id="aacaae6d523ad0440eb5d30c8ff07b3e8" name="aacaae6d523ad0440eb5d30c8ff07b3e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aacaae6d523ad0440eb5d30c8ff07b3e8">&#9670;&#160;</a></span>errMsg()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string tcpConnect::errMsg </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="#a4d03abd4b5fcdddd1824fa62d7e1d76a">emErrCode</a></td>          <td class="paramname"><span class="paramname"><em>e</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>读取错误消息 </p>
<dl class="section return"><dt>返回</dt><dd>返回错误编号对应的错误内容 </dd></dl>

<p class="definition">在文件 <a class="el" href="../../df/db6/connection_8cpp_source.html">connection.cpp</a> 第 <a class="el" href="../../df/db6/connection_8cpp_source.html#l00181">181</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d5/dca/classtcp_connect_aacaae6d523ad0440eb5d30c8ff07b3e8_icgraph.png" border="0" usemap="#ad5/dca/classtcp_connect_aacaae6d523ad0440eb5d30c8ff07b3e8_icgraph" alt=""/></div>
<map name="ad5/dca/classtcp_connect_aacaae6d523ad0440eb5d30c8ff07b3e8_icgraph" id="ad5/dca/classtcp_connect_aacaae6d523ad0440eb5d30c8ff07b3e8_icgraph">
<area shape="rect" title="读取错误消息" alt="" coords="584,5,721,32"/>
<area shape="rect" href="../../d2/d50/classtcp_svr.html#ab02384e56ed993d541cd8515677b59ac" title=" " alt="" coords="351,5,536,32"/>
<area shape="poly" title=" " alt="" coords="569,21,537,21,537,16,569,16"/>
<area shape="rect" href="../../dc/d4c/tcp_svr_8cpp.html#aad3cf4543921afb4bc5d2068be6b8c85" title=" " alt="" coords="167,5,303,32"/>
<area shape="poly" title=" " alt="" coords="336,21,303,21,303,16,336,16"/>
<area shape="rect" href="../../d2/d50/classtcp_svr.html#a0f76b1e77ef99c4b0d8aa35e4bec2aba" title=" " alt="" coords="5,5,119,32"/>
<area shape="poly" title=" " alt="" coords="151,21,119,21,119,16,151,16"/>
</map>
</div>

</div>
</div>
<a id="a3db9cc5be0a25212c5cf1f7d3c0a229f" name="a3db9cc5be0a25212c5cf1f7d3c0a229f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3db9cc5be0a25212c5cf1f7d3c0a229f">&#9670;&#160;</a></span>name() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const std::string &amp; tcpConnect::name </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../dd/d42/connection_8hpp_source.html">connection.hpp</a> 第 <a class="el" href="../../dd/d42/connection_8hpp_source.html#l00066">66</a> 行定义.</p>

</div>
</div>
<a id="abc6cec650922874b8ca82221fe8e987b" name="abc6cec650922874b8ca82221fe8e987b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abc6cec650922874b8ca82221fe8e987b">&#9670;&#160;</a></span>name() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void tcpConnect::name </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>n</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>指定连接名称或者读取连接名称 </p>

<p class="definition">在文件 <a class="el" href="../../dd/d42/connection_8hpp_source.html">connection.hpp</a> 第 <a class="el" href="../../dd/d42/connection_8hpp_source.html#l00065">65</a> 行定义.</p>

</div>
</div>
<a id="a62b839c5c632070457c11141ec17b940" name="a62b839c5c632070457c11141ec17b940"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62b839c5c632070457c11141ec17b940">&#9670;&#160;</a></span>onAllocMem()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tcpConnect::onAllocMem </td>
          <td>(</td>
          <td class="paramtype">uv_buf_t *</td>          <td class="paramname"><span class="paramname"><em>buf</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>响应内存分配请求 </p>

<p class="definition">在文件 <a class="el" href="../../df/db6/connection_8cpp_source.html">connection.cpp</a> 第 <a class="el" href="../../df/db6/connection_8cpp_source.html#l00101">101</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d5/dca/classtcp_connect_a62b839c5c632070457c11141ec17b940_icgraph.png" border="0" usemap="#ad5/dca/classtcp_connect_a62b839c5c632070457c11141ec17b940_icgraph" alt=""/></div>
<map name="ad5/dca/classtcp_connect_a62b839c5c632070457c11141ec17b940_icgraph" id="ad5/dca/classtcp_connect_a62b839c5c632070457c11141ec17b940_icgraph">
<area shape="rect" title="响应内存分配请求" alt="" coords="332,5,500,32"/>
<area shape="rect" href="../../df/db6/connection_8cpp.html#a91ba2742535362adbd9c1da1af0da2bf" title=" " alt="" coords="176,5,284,32"/>
<area shape="poly" title=" " alt="" coords="317,21,285,21,285,16,317,16"/>
<area shape="rect" href="../../d5/dca/classtcp_connect.html#a6a44f7ed0e8e6c5026f69eb93b9484db" title="启动执行" alt="" coords="5,5,128,32"/>
<area shape="poly" title=" " alt="" coords="160,21,128,21,128,16,160,16"/>
</map>
</div>

</div>
</div>
<a id="a39a9e6922fd51d19c7d422e1f41d86bb" name="a39a9e6922fd51d19c7d422e1f41d86bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a39a9e6922fd51d19c7d422e1f41d86bb">&#9670;&#160;</a></span>onClosed()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tcpConnect::onClosed </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>关闭 </p>

<p class="definition">在文件 <a class="el" href="../../df/db6/connection_8cpp_source.html">connection.cpp</a> 第 <a class="el" href="../../df/db6/connection_8cpp_source.html#l00172">172</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d5/dca/classtcp_connect_a39a9e6922fd51d19c7d422e1f41d86bb_icgraph.png" border="0" usemap="#ad5/dca/classtcp_connect_a39a9e6922fd51d19c7d422e1f41d86bb_icgraph" alt=""/></div>
<map name="ad5/dca/classtcp_connect_a39a9e6922fd51d19c7d422e1f41d86bb_icgraph" id="ad5/dca/classtcp_connect_a39a9e6922fd51d19c7d422e1f41d86bb_icgraph">
<area shape="rect" title="关闭" alt="" coords="641,31,792,57"/>
<area shape="rect" href="../../df/db6/connection_8cpp.html#ad6d775ae6fc3120f2fcf56f9f9bdb0c1" title=" " alt="" coords="498,31,593,57"/>
<area shape="poly" title=" " alt="" coords="625,47,593,47,593,41,625,41"/>
<area shape="rect" href="../../d5/dca/classtcp_connect.html#ace0b548a07940bc95005fd84d1d4917f" title="关闭连接" alt="" coords="318,5,445,32"/>
<area shape="poly" title=" " alt="" coords="482,37,445,31,446,26,483,32"/>
<area shape="rect" href="../../d5/dca/classtcp_connect.html#a14f3ada6e1c24b0a973696f586badb63" title="处理接受数据" alt="" coords="312,56,450,83"/>
<area shape="poly" title=" " alt="" coords="483,56,451,61,450,56,482,51"/>
<area shape="rect" href="../../df/db6/connection_8cpp.html#a1a895ba4a6dd38c2a49f2081005c87c3" title=" " alt="" coords="176,56,264,83"/>
<area shape="poly" title=" " alt="" coords="297,72,265,72,265,67,297,67"/>
<area shape="rect" href="../../d5/dca/classtcp_connect.html#a6a44f7ed0e8e6c5026f69eb93b9484db" title="启动执行" alt="" coords="5,56,128,83"/>
<area shape="poly" title=" " alt="" coords="160,72,128,72,128,67,160,67"/>
</map>
</div>

</div>
</div>
<a id="a14f3ada6e1c24b0a973696f586badb63" name="a14f3ada6e1c24b0a973696f586badb63"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a14f3ada6e1c24b0a973696f586badb63">&#9670;&#160;</a></span>onData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tcpConnect::onData </td>
          <td>(</td>
          <td class="paramtype">const char *</td>          <td class="paramname"><span class="paramname"><em>data</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ssize_t</td>          <td class="paramname"><span class="paramname"><em>len</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>处理接受数据 </p>

<p class="definition">在文件 <a class="el" href="../../df/db6/connection_8cpp_source.html">connection.cpp</a> 第 <a class="el" href="../../df/db6/connection_8cpp_source.html#l00079">79</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d5/dca/classtcp_connect_a14f3ada6e1c24b0a973696f586badb63_cgraph.png" border="0" usemap="#ad5/dca/classtcp_connect_a14f3ada6e1c24b0a973696f586badb63_cgraph" alt=""/></div>
<map name="ad5/dca/classtcp_connect_a14f3ada6e1c24b0a973696f586badb63_cgraph" id="ad5/dca/classtcp_connect_a14f3ada6e1c24b0a973696f586badb63_cgraph">
<area shape="rect" title="处理接受数据" alt="" coords="5,5,144,32"/>
<area shape="rect" href="../../df/db6/connection_8cpp.html#ad6d775ae6fc3120f2fcf56f9f9bdb0c1" title=" " alt="" coords="192,5,286,32"/>
<area shape="poly" title=" " alt="" coords="144,16,176,16,176,21,144,21"/>
<area shape="rect" href="../../d5/dca/classtcp_connect.html#a39a9e6922fd51d19c7d422e1f41d86bb" title="关闭" alt="" coords="334,5,485,32"/>
<area shape="poly" title=" " alt="" coords="287,16,319,16,319,21,287,21"/>
</map>
</div>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d5/dca/classtcp_connect_a14f3ada6e1c24b0a973696f586badb63_icgraph.png" border="0" usemap="#ad5/dca/classtcp_connect_a14f3ada6e1c24b0a973696f586badb63_icgraph" alt=""/></div>
<map name="ad5/dca/classtcp_connect_a14f3ada6e1c24b0a973696f586badb63_icgraph" id="ad5/dca/classtcp_connect_a14f3ada6e1c24b0a973696f586badb63_icgraph">
<area shape="rect" title="处理接受数据" alt="" coords="312,5,450,32"/>
<area shape="rect" href="../../df/db6/connection_8cpp.html#a1a895ba4a6dd38c2a49f2081005c87c3" title=" " alt="" coords="176,5,264,32"/>
<area shape="poly" title=" " alt="" coords="297,21,265,21,265,16,297,16"/>
<area shape="rect" href="../../d5/dca/classtcp_connect.html#a6a44f7ed0e8e6c5026f69eb93b9484db" title="启动执行" alt="" coords="5,5,128,32"/>
<area shape="poly" title=" " alt="" coords="160,21,128,21,128,16,160,16"/>
</map>
</div>

</div>
</div>
<a id="ac906dea41da72e91452818a0bd8383aa" name="ac906dea41da72e91452818a0bd8383aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac906dea41da72e91452818a0bd8383aa">&#9670;&#160;</a></span>onDisconnected()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void tcpConnect::onDisconnected </td>
          <td>(</td>
          <td class="paramtype">std::function&lt; void(const std::string &amp;) &gt;</td>          <td class="paramname"><span class="paramname"><em>fun</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../dd/d42/connection_8hpp_source.html">connection.hpp</a> 第 <a class="el" href="../../dd/d42/connection_8hpp_source.html#l00089">89</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d5/dca/classtcp_connect_ac906dea41da72e91452818a0bd8383aa_icgraph.png" border="0" usemap="#ad5/dca/classtcp_connect_ac906dea41da72e91452818a0bd8383aa_icgraph" alt=""/></div>
<map name="ad5/dca/classtcp_connect_ac906dea41da72e91452818a0bd8383aa_icgraph" id="ad5/dca/classtcp_connect_ac906dea41da72e91452818a0bd8383aa_icgraph">
<area shape="rect" title=" " alt="" coords="584,5,775,32"/>
<area shape="rect" href="../../d2/d50/classtcp_svr.html#ab02384e56ed993d541cd8515677b59ac" title=" " alt="" coords="351,5,536,32"/>
<area shape="poly" title=" " alt="" coords="569,21,537,21,537,16,569,16"/>
<area shape="rect" href="../../dc/d4c/tcp_svr_8cpp.html#aad3cf4543921afb4bc5d2068be6b8c85" title=" " alt="" coords="167,5,303,32"/>
<area shape="poly" title=" " alt="" coords="336,21,303,21,303,16,336,16"/>
<area shape="rect" href="../../d2/d50/classtcp_svr.html#a0f76b1e77ef99c4b0d8aa35e4bec2aba" title=" " alt="" coords="5,5,119,32"/>
<area shape="poly" title=" " alt="" coords="151,21,119,21,119,16,151,16"/>
</map>
</div>

</div>
</div>
<a id="a07bd0d4dc7717401320314fa817996c2" name="a07bd0d4dc7717401320314fa817996c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a07bd0d4dc7717401320314fa817996c2">&#9670;&#160;</a></span>onError()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void tcpConnect::onError </td>
          <td>(</td>
          <td class="paramtype">std::function&lt; void(const std::string &amp;, <a class="el" href="#a4d03abd4b5fcdddd1824fa62d7e1d76a">emErrCode</a>) &gt;</td>          <td class="paramname"><span class="paramname"><em>fun</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../dd/d42/connection_8hpp_source.html">connection.hpp</a> 第 <a class="el" href="../../dd/d42/connection_8hpp_source.html#l00090">90</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d5/dca/classtcp_connect_a07bd0d4dc7717401320314fa817996c2_icgraph.png" border="0" usemap="#ad5/dca/classtcp_connect_a07bd0d4dc7717401320314fa817996c2_icgraph" alt=""/></div>
<map name="ad5/dca/classtcp_connect_a07bd0d4dc7717401320314fa817996c2_icgraph" id="ad5/dca/classtcp_connect_a07bd0d4dc7717401320314fa817996c2_icgraph">
<area shape="rect" title=" " alt="" coords="584,5,723,32"/>
<area shape="rect" href="../../d2/d50/classtcp_svr.html#ab02384e56ed993d541cd8515677b59ac" title=" " alt="" coords="351,5,536,32"/>
<area shape="poly" title=" " alt="" coords="569,21,537,21,537,16,569,16"/>
<area shape="rect" href="../../dc/d4c/tcp_svr_8cpp.html#aad3cf4543921afb4bc5d2068be6b8c85" title=" " alt="" coords="167,5,303,32"/>
<area shape="poly" title=" " alt="" coords="336,21,303,21,303,16,336,16"/>
<area shape="rect" href="../../d2/d50/classtcp_svr.html#a0f76b1e77ef99c4b0d8aa35e4bec2aba" title=" " alt="" coords="5,5,119,32"/>
<area shape="poly" title=" " alt="" coords="151,21,119,21,119,16,151,16"/>
</map>
</div>

</div>
</div>
<a id="a773c8544725f30fdc63afaf934f6aefd" name="a773c8544725f30fdc63afaf934f6aefd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a773c8544725f30fdc63afaf934f6aefd">&#9670;&#160;</a></span>onRecv()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void tcpConnect::onRecv </td>
          <td>(</td>
          <td class="paramtype">std::function&lt; void(const std::string &amp;, const char *, size_t len)&gt;</td>          <td class="paramname"><span class="paramname"><em>fun</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置事件回调函数 </p>

<p class="definition">在文件 <a class="el" href="../../dd/d42/connection_8hpp_source.html">connection.hpp</a> 第 <a class="el" href="../../dd/d42/connection_8hpp_source.html#l00088">88</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d5/dca/classtcp_connect_a773c8544725f30fdc63afaf934f6aefd_icgraph.png" border="0" usemap="#ad5/dca/classtcp_connect_a773c8544725f30fdc63afaf934f6aefd_icgraph" alt=""/></div>
<map name="ad5/dca/classtcp_connect_a773c8544725f30fdc63afaf934f6aefd_icgraph" id="ad5/dca/classtcp_connect_a773c8544725f30fdc63afaf934f6aefd_icgraph">
<area shape="rect" title="设置事件回调函数" alt="" coords="584,5,726,32"/>
<area shape="rect" href="../../d2/d50/classtcp_svr.html#ab02384e56ed993d541cd8515677b59ac" title=" " alt="" coords="351,5,536,32"/>
<area shape="poly" title=" " alt="" coords="569,21,537,21,537,16,569,16"/>
<area shape="rect" href="../../dc/d4c/tcp_svr_8cpp.html#aad3cf4543921afb4bc5d2068be6b8c85" title=" " alt="" coords="167,5,303,32"/>
<area shape="poly" title=" " alt="" coords="336,21,303,21,303,16,336,16"/>
<area shape="rect" href="../../d2/d50/classtcp_svr.html#a0f76b1e77ef99c4b0d8aa35e4bec2aba" title=" " alt="" coords="5,5,119,32"/>
<area shape="poly" title=" " alt="" coords="151,21,119,21,119,16,151,16"/>
</map>
</div>

</div>
</div>
<a id="a22c40023d8cbc2258ae0003f2a1de7f3" name="a22c40023d8cbc2258ae0003f2a1de7f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a22c40023d8cbc2258ae0003f2a1de7f3">&#9670;&#160;</a></span>onSendFail()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tcpConnect::onSendFail </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>发送失败的回调函数 </p>

<p class="definition">在文件 <a class="el" href="../../df/db6/connection_8cpp_source.html">connection.cpp</a> 第 <a class="el" href="../../df/db6/connection_8cpp_source.html#l00092">92</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d5/dca/classtcp_connect_a22c40023d8cbc2258ae0003f2a1de7f3_icgraph.png" border="0" usemap="#ad5/dca/classtcp_connect_a22c40023d8cbc2258ae0003f2a1de7f3_icgraph" alt=""/></div>
<map name="ad5/dca/classtcp_connect_a22c40023d8cbc2258ae0003f2a1de7f3_icgraph" id="ad5/dca/classtcp_connect_a22c40023d8cbc2258ae0003f2a1de7f3_icgraph">
<area shape="rect" title="发送失败的回调函数" alt="" coords="317,5,478,32"/>
<area shape="rect" href="../../df/db6/connection_8cpp.html#af6a7fe6d10847074d7c25a27c728a725" title=" " alt="" coords="178,5,269,32"/>
<area shape="poly" title=" " alt="" coords="301,21,270,21,270,16,301,16"/>
<area shape="rect" href="../../d5/dca/classtcp_connect.html#a3e573d0bbcfd9a2c0e7f10f37d84fa46" title="发送数据" alt="" coords="5,5,130,32"/>
<area shape="poly" title=" " alt="" coords="162,21,130,21,130,16,162,16"/>
</map>
</div>

</div>
</div>
<a id="a0e47a364f3a6980332e35589eb4b8690" name="a0e47a364f3a6980332e35589eb4b8690"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e47a364f3a6980332e35589eb4b8690">&#9670;&#160;</a></span>peerAddress()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string tcpConnect::peerAddress </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取对端对峙 </p>

<p class="definition">在文件 <a class="el" href="../../df/db6/connection_8cpp_source.html">connection.cpp</a> 第 <a class="el" href="../../df/db6/connection_8cpp_source.html#l00154">154</a> 行定义.</p>

</div>
</div>
<a id="a1ad930fd567805e8bdb83b2189ff5c48" name="a1ad930fd567805e8bdb83b2189ff5c48"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1ad930fd567805e8bdb83b2189ff5c48">&#9670;&#160;</a></span>peerPort()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tcpConnect::peerPort </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取对端端口 </p>

<p class="definition">在文件 <a class="el" href="../../df/db6/connection_8cpp_source.html">connection.cpp</a> 第 <a class="el" href="../../df/db6/connection_8cpp_source.html#l00167">167</a> 行定义.</p>

</div>
</div>
<a id="a3e573d0bbcfd9a2c0e7f10f37d84fa46" name="a3e573d0bbcfd9a2c0e7f10f37d84fa46"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e573d0bbcfd9a2c0e7f10f37d84fa46">&#9670;&#160;</a></span>send()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tcpConnect::send </td>
          <td>(</td>
          <td class="paramtype">const char *</td>          <td class="paramname"><span class="paramname"><em>data</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>len</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>发送数据 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td></td></tr>
    <tr><td class="paramname">len</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../df/db6/connection_8cpp_source.html">connection.cpp</a> 第 <a class="el" href="../../df/db6/connection_8cpp_source.html#l00205">205</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d5/dca/classtcp_connect_a3e573d0bbcfd9a2c0e7f10f37d84fa46_cgraph.png" border="0" usemap="#ad5/dca/classtcp_connect_a3e573d0bbcfd9a2c0e7f10f37d84fa46_cgraph" alt=""/></div>
<map name="ad5/dca/classtcp_connect_a3e573d0bbcfd9a2c0e7f10f37d84fa46_cgraph" id="ad5/dca/classtcp_connect_a3e573d0bbcfd9a2c0e7f10f37d84fa46_cgraph">
<area shape="rect" title="发送数据" alt="" coords="5,5,130,32"/>
<area shape="rect" href="../../df/db6/connection_8cpp.html#af6a7fe6d10847074d7c25a27c728a725" title=" " alt="" coords="178,5,269,32"/>
<area shape="poly" title=" " alt="" coords="130,16,162,16,162,21,130,21"/>
<area shape="rect" href="../../d5/dca/classtcp_connect.html#a22c40023d8cbc2258ae0003f2a1de7f3" title="发送失败的回调函数" alt="" coords="317,5,478,32"/>
<area shape="poly" title=" " alt="" coords="269,16,301,16,301,21,269,21"/>
</map>
</div>

</div>
</div>
<a id="a6a44f7ed0e8e6c5026f69eb93b9484db" name="a6a44f7ed0e8e6c5026f69eb93b9484db"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6a44f7ed0e8e6c5026f69eb93b9484db">&#9670;&#160;</a></span>start()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tcpConnect::start </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>启动执行 </p>

<p class="definition">在文件 <a class="el" href="../../df/db6/connection_8cpp_source.html">connection.cpp</a> 第 <a class="el" href="../../df/db6/connection_8cpp_source.html#l00145">145</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d5/dca/classtcp_connect_a6a44f7ed0e8e6c5026f69eb93b9484db_cgraph.png" border="0" usemap="#ad5/dca/classtcp_connect_a6a44f7ed0e8e6c5026f69eb93b9484db_cgraph" alt=""/></div>
<map name="ad5/dca/classtcp_connect_a6a44f7ed0e8e6c5026f69eb93b9484db_cgraph" id="ad5/dca/classtcp_connect_a6a44f7ed0e8e6c5026f69eb93b9484db_cgraph">
<area shape="rect" title="启动执行" alt="" coords="5,31,128,57"/>
<area shape="rect" href="../../df/db6/connection_8cpp.html#a91ba2742535362adbd9c1da1af0da2bf" title=" " alt="" coords="176,5,284,32"/>
<area shape="poly" title=" " alt="" coords="128,32,160,27,161,32,129,37"/>
<area shape="rect" href="../../df/db6/connection_8cpp.html#a1a895ba4a6dd38c2a49f2081005c87c3" title=" " alt="" coords="186,56,274,83"/>
<area shape="poly" title=" " alt="" coords="129,51,171,58,170,63,128,56"/>
<area shape="rect" href="../../d5/dca/classtcp_connect.html#a62b839c5c632070457c11141ec17b940" title="响应内存分配请求" alt="" coords="332,5,500,32"/>
<area shape="poly" title=" " alt="" coords="284,16,316,16,316,21,284,21"/>
<area shape="rect" href="../../d5/dca/classtcp_connect.html#a14f3ada6e1c24b0a973696f586badb63" title="处理接受数据" alt="" coords="347,56,485,83"/>
<area shape="poly" title=" " alt="" coords="274,67,332,67,332,72,274,72"/>
<area shape="rect" href="../../df/db6/connection_8cpp.html#ad6d775ae6fc3120f2fcf56f9f9bdb0c1" title=" " alt="" coords="548,56,643,83"/>
<area shape="poly" title=" " alt="" coords="486,67,533,67,533,72,486,72"/>
<area shape="rect" href="../../d5/dca/classtcp_connect.html#a39a9e6922fd51d19c7d422e1f41d86bb" title="关闭" alt="" coords="691,56,842,83"/>
<area shape="poly" title=" " alt="" coords="643,67,675,67,675,72,643,72"/>
</map>
</div>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>include/<a class="el" href="../../dd/d42/connection_8hpp_source.html">connection.hpp</a></li>
<li>src/<a class="el" href="../../df/db6/connection_8cpp_source.html">connection.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
